import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/en' // lang i18n

import '@/styles/index.scss' // global css

import App from './App'
import router from './router'
import store from './store'
import Axios from 'axios'
import i18n from './lang'
import Cookies from 'js-cookie'
import FullCalendar from 'vue-full-calendar'
import '@/icons' // icon
import '@/permission' // permission control
import 'fullcalendar/dist/fullcalendar.css'
import 'fullcalendar-scheduler'
import 'fullcalendar/dist/fullcalendar.min.css'
import elCascaderMulti from 'el-cascader-multi'

Vue.use(ElementUI, { locale })
Vue.use(require('vue-moment'))
Vue.use(FullCalendar)
Vue.prototype.$axios = Axios
Vue.prototype.HOST = process.env.API_BASEURL
Vue.use(elCascaderMulti)

Vue.config.productionTip = false

Vue.use(ElementUI, {
  size: Cookies.get('size') || 'medium', // set element-ui default size
  i18n: (key, value) => i18n.t(key, value)
})

new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: h => h(App)
})

